TablePool = {
    _poolList = {},
    _limit = 50,
    _count = 0
}
---@class TablePool
local this = TablePool

function TablePool.Get()
    for k,v in pairs(this._poolList) do
        this._poolList[k] = nil
        this._count = this._count -1
        return k
    end
    return {nil,nil,nil}
end
function TablePool.Release(tb)
    TablePool.ReleaseDeeper(tb,false)
end
function TablePool.ReleaseDeeper(tb,isDeeper)
    if not tb then return end
    if this._count >= this._limit then
        return
    end
    for k,v in pairs(tb) do
        tb[k] = nil
        if isDeeper and type(k) == "table" then
            this.Release(k)
        end
        if isDeeper and type(v) == "table" then
            this.Release(v)
        end
    end
    if this._poolList[tb] then
        return
    end
    this._count = this._count + 1
    this._poolList[tb] = 1
end